package org.ztr.yanai.blog.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Author: ZhaoTR
 * @Date: Created in 2025/11/22 10:00
 * @Description: 用户角色枚举
 * @Version: 1.0
 */
// 用户角色枚举
@Getter
@AllArgsConstructor
public enum UserRoleEnum {
    USER("user", "普通用户"),
    ADMIN("admin", "管理员"),
    EDITOR("editor", "编辑"),
    SUBSCRIBER("subscriber", "订阅者");

    @EnumValue // 标记存储到数据库的值
    private final String code;
    
    private final String desc;
}